namespace Ds.DataBase.Migrations
{
    using System;
    using System.Data.Entity.Migrations;
    
    public partial class InitialCreate : DbMigration
    {
        public override void Up()
        {
            CreateTable(
                "dbo.JiaoZhiGongInfoes",
                c => new
                    {
                        zgid = c.Int(nullable: false, identity: true),
                        XingMing = c.String(),
                        ShouJiHao = c.String(),
                        Users_userinfoId = c.Guid(),
                    })
                .PrimaryKey(t => t.zgid)
                .ForeignKey("dbo.UserInfoes", t => t.Users_userinfoId)
                .Index(t => t.Users_userinfoId);
            
            CreateTable(
                "dbo.UserInfoes",
                c => new
                    {
                        userinfoId = c.Guid(nullable: false, identity: true),
                        username = c.String(),
                        password = c.String(),
                    })
                .PrimaryKey(t => t.userinfoId);
            
        }
        
        public override void Down()
        {
            DropForeignKey("dbo.JiaoZhiGongInfoes", "Users_userinfoId", "dbo.UserInfoes");
            DropIndex("dbo.JiaoZhiGongInfoes", new[] { "Users_userinfoId" });
            DropTable("dbo.UserInfoes");
            DropTable("dbo.JiaoZhiGongInfoes");
        }
    }
}
